InvalidPatternException.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 19
cc 1
rs 9.4285
1
/**
2
 * When a pattern is not respected, of a command
3
 *
4
 * @class InvalidPatternException
5
 * @extends {Error}
6
 */
7
class InvalidPatternException extends Error {
8
    /**
9
     * Creates an instance of InvalidPatternException.
10
     * @param {string} suffixe The command's suffixe
11
     * @memberof InvalidPatternException
12
     */
13
  constructor (suffixe = null) {
14
    super('Pattern not matching with suffixe: ' + suffixe)
15
        /**
16
         * The suffixe that doesn't match
17
         * @type {string}
18
         * @name InvalidPatternException#suffixe
19
         * @readonly
20
         */
21
    this.suffixe = suffixe
22
        /**
23
         * The fisherCode
24
         * @readonly
25
         * @constant
26
         * @name InvalidPatternException#code
27
         * @type {number}
28
         * @default 303
29
         */
30
    this.code = 303
31
  }
32
}
33
module.exports = InvalidPatternException
34